boorufandomcom-20200214-history
Filter
filter: * noun (plural filters): *# "a porous device for removing impurities or solid particles from a liquid or gas passed through it" *# an image manipulation filter * verb (past tense filtered, present tense filtering, third-person singular filters) Details The tag "spoilers" is blacklisted by default for users at one or more boorus; posts with blacklisted tags are filtered out. In Linux In GNU+Linux users can filter the filetypes seen with the terminal command ls -R (long format: ls --recursive) by appending text to the command then running it. This is elaborated upon in the following. * Step 1: go to a directory. ** Users don't have to use quotes when going to spaceless directories, example: *** cd /directory/subdirectory ** Quotes or backslashes are needed to go to directories with spaces, examples: *** cd "/directory/sub directory" *** cd /directory/sub\ directory * Step 2: understand the ls command. ** ls: look inside directory *** ls -R --recursive: basically looks inside all subdirectories *** ls -l: user, size, and date info **** The first character of each line which is outputted from this command will be "d", "-", or another character. If it is "d" then it is a directory; if it is "-" then it is a regular file, and if it is some other character then it is not a directory. *** ls -a: don't ignore entries that start with "." *** ls --help: view for more info on using ls * Step 3: understand the grep command. ** grep: search for a pattern in each file or standard input. (Basically context controllerneed) *** grep -v: select non-matching lines **** For example, grep -v "check" will return all lines not containing the text "check". *** grep -i: ignore case distinctions (makes the search not case sensitive) **** For example, grep -i "AA-12" will return all lines containing "AA-12" regardless of the case: "AA-12", "aa-12", "Aa-12", and "aA-12". *** Report bugs to: bug-grep@gnu.org *** GNU Grep home page: *** General help using GNU software: ** egrep is the same as grep except it can run regular expressions. *** egrep "(ak101|ak-102|ak-107)" (one or more items to match are written inside of the parentheses and separated by vertical bars) will return all lines containing "ak101" or "ak-102" or "ak-107". These "(a|b|c)" things are nestable; for example, **** "(a(w|x|y|z)|b|c)" can be used instead of **** "(aw|ax|ay|az|b|c)". *** egrep "black-haired_girl_(.flow)" will return all lines containing that text with "." acting as a wildcard that will match any non-newline character. Problematically, this will match "black-haired_girl_(1flow)", "black-haired_girl_('flow)", "black-haired_girl_(zflow)", "black-haired_girl_(.flow)", etc. In order to get the dot to quite acting functionally and start being interpreted as a literal character use one backslash to escape it; egrep "black-haired_girl_(\.flow)" will only return all lines containing "black-haired_girl_(.flow)". *** egrep "blonde?" (the question mark mean "zero or one of the preceding token") will return all lines containing "blond" or "blonde" *** egrep "blazblue:_chronophantasma$" (the dollar sign is an end-of-line anchor) will only match lines ending in "blazblue:_chronophantasma", so it will not match lines which end in "blazblue:_chronophantasmamamama", "blazblue:_chronophantasma123", "blazblue:_chronophantasma'@)", etc. *** egrep "^blazblue_insignia" (the circumflex is a beginning-of-line anchor) will only match lines beginning with "blazblue_insignia", so it will not match lines which begin with "blue_insignia", "984blazblue_insignia", "#%blazblue_insignia", etc. *** egrep "^nut" (the square brackets containing a circumflex preceding a character is a negated character set) will only match lines which contain the text "ut" so long as "ut" is not immediately preceded by "n". This command will not match "nut", but it will match "but", "gut", "7ut", "$ut", etc. *** egrep "camouflage_.+" (the plus sign means "one or more of the preceding token") will only match lines which contain the text "camouflage_" so long as "camouflage_" is immediately followed by one or more non-newline characters. This command will not match a line ending in "camouflage_", but it will match "camouflage_bikinis", "camouflage_bra873", "camouflage_panties#&", etc. * Step 5: use the commands to filter out the desired filetypes. ** ls -Ral | egrep -vi "^^d.+\.(jpe?g|p(ng|df|sd)|db|nfo|url|torrent)$" Category:Rule34.xxx